package ge.lowlevel.box2d;

import ge.engine.Positionable;
import ge.exceptions.FunctionNonSuported;
import ge.modules.physics.PhysicsAttributes;


/**
 * 
 * @author Abel
 *	Represents a Box body in box2d objects
 */
public abstract class BoxGe<BoxType>  implements Positionable
{
	/**
	 * 	Creates a box in the world 
	 * 
	 * @param world WorldGe
	 * @param pAtt  Common Physics Attributes
	 * @param width
	 * @param height
	 * @param x
	 * @param y
	 */
	public BoxGe (WorldGe world,PhysicsAttributes pAtt,double width, double height,double x, double y)
	{
	}
	/**
	 * Applies a impulse to the box with (fx,fy) direction from (x,y) point.
	 *  x e y could be the box position
	 * @param fx force in x axis
	 * @param fy force in y axis
	 * @param x Point x
	 * @param y Point y
	 * @throws FunctionNonSuported if the engine doesn't support it
	 */
	public void applyImpulse(double fx, double fy, double x, double y) throws FunctionNonSuported
	{
		throw new FunctionNonSuported("Box2d-BoxGe", "applyImpulse");
	}
	/**
	 * 	 You must need the information about the points of the body, in order to
	 * draw them with a ShapeModule. The points will be given to you in string
	 * (Is not the most efficient object but we have to avoid the incompatibilities)
	 *  in the next format (p1x p1y p2x p2y).
	 *   
	 * @param numShape One body can have more than one shape. With the index you choose
	 * the shape you want to know its points. 
	 * @throws FunctionNonSuported if the engine doesn't support it
	 */
	public String getPoints(int numShape) throws FunctionNonSuported
	{
		throw new FunctionNonSuported("Box2d-BoxGe", "getPoints");
	}
	//Positionable interface
	public abstract void setPos(double x, double y);
	public abstract double getX();
	public abstract double getY();
	public abstract void setLinealVelocity(double x, double y);
	public abstract double getXLinealVelocity();
	public abstract double getYLinealVelocity();
	/**
	 * 
	 * @param world World of box2d
	 * @throws FunctionNonSuported if the engine doesn't support it
	 */
	public void destroyBody(WorldGe world) throws FunctionNonSuported
	{
		throw new FunctionNonSuported("Box2d-BoxGe", "destroyBody");
	}
	/**
	 * 
	 * @return The concret implementation of the box
	 * @throws FunctionNonSuported if the engine doesn't support it
	 */
	public BoxType getBox() throws FunctionNonSuported
	{
		throw new FunctionNonSuported("Box2d-BoxGe", "getBox");
	}
}
